import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Template {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column({
    default: 'Template',
  })
  type: 'Template';

  @Column({
    nullable: true,
  })
  description: string;

  @Column('longtext')
  content: string;

  @Column({
    default: false,
  })
  deleted: boolean;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  createdAt: Date;
}
